class ContactsController  < ApplicationController
  def index

  end

  def send_user_message
    @contact = Contact.create(params[:contact])
    user = User.find_by_role('superadmin')
    if @contact.errors.empty?
      Messagemailer.deliver_contact_us(user,@contact)
      flash[:cre_contact_ss] = "Dear Mr/Mrs/Ms #{@contact.contact_name} has been successfully send to our webmaster."
      redirect_to :action =>"index"
    else
      flash[:cre_contact_err] = "Your message can not be send ... please try again."
      render :action =>"index"
    end
  end
end